How to check if Emacs is in GUI mode (and execute `tool-bar-mode` only then)?
Posted
by dehmann
on Server Fault
See other posts from Server Fault
or by dehmann
Published on 2010-04-13T18:19:50Z
Indexed on
2010/04/13
18:23 UTC
Read the original article
Hit count: 425
I have this line in my .emacs
file:
(tool-bar-mode 0)
because I hate the toolbars in my GUI emacs (/Applications/Emacs.app/Contents/MacOS/Emacs
).
But when I start up my other, text-based emacs in the terminal (/opt/local/bin/emacs
) it complains about that command:
Symbol's function definition is void: tool-bar-mode
How can I add an if
condition so that it executes the tool-bar-mode
command only when I'm in the GUI emacs?
Thanks!
© Server Fault or respective owner